package org.ipower.examsystem.action;

import org.ipower.examsystem.service.MembershipCatalogInfoCollection;
import org.ipower.examsystem.service.MembershipService;
/**
 * 会员科目树。
 * @author jeasonyoung
 */
public class MembershipCatalogTreeAction extends ModuleBaseAction<MembershipService> {
    private static final long serialVersionUID = 1L;
    private  MembershipCatalogInfoCollection collection = null;
    private String memberID;
    /**
     * 设置会员ID。
     * @param memberID 会员ID。
     * */
    public void setMemberID(String memberID) {
        this.memberID = memberID;
    }
    /**
     * 获取会员科目树数据。
     * @return 树结构数据。
     * */
    public MembershipCatalogInfoCollection getChildren(){
        return this.collection;
    }
      /**
     * 默认执行。
     * @return 执行结果。
     * */
    @Override
    public String execute() throws Exception{
        this.collection = this.getService().createCatalogTree(this.memberID);
        return SUCCESS;
    }
}